package com.wch.SpringBootTestDemo.jwt;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;

public class ParseJwtTest {

	public static void main(String[] args) {
		String token = "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI4ODgiLCJzdWIiOiLlpKfnmb0iLCJpYXQiOjE1NTYyNjE5NTV9.A91A3Uzmh_e88CeFXspcg4LWQYFfvrcjkFOtiKI7E1k";
		Claims claims = Jwts.parser().setSigningKey("itcast").parseClaimsJws(token).getBody();
		System.out.println("id:"+claims.getId());
		System.out.println("subject:"+claims.getSubject());
		System.out.println("IssuedAt:"+claims.getIssuedAt());
		
	}
}
